package com.strange.mdl.module.mdl.controller.app.activity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;

@Schema(description = "用户 APP - 活动 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AppActivityRespVO {

    @Schema(description = "活动id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26690")
    @ExcelProperty("活动id")
    private Long id;

    @Schema(description = "活动标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("活动标题")
    private String title;

    @Schema(description = "活动描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
    @ExcelProperty("活动描述")
    private String description;

    @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("活动开始时间")
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime eventEndTime;
    @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("活动结束时间")
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime eventStartTime;
    @Schema(description = "报名开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("报名开始时间")
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    @Schema(description = "报名结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("报名结束时间")
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @Schema(description = "地点", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("地点")
    private String location;

    @Schema(description = "最大参与人数", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("最大参与人数")
    private Integer maxParticipants;

    @Schema(description = "活动封面", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
    @ExcelProperty("活动封面")
    private String coverUrl;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    @JsonDeserialize(using = LocalDateDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "实际参与人数")
    @ExcelProperty("实际参与人数")
    private Integer singUpNumber;


    @Schema(description = "参与人数")
    @ExcelProperty("参与人数")
    private Integer userNum;

    private List<AppActivityUserRespVO> userLists;

}